/*
 * 文件名:CPlayList.h
 *
 * 	 功能描述:播放列表类
 *  创建日期: 2011-1-26
 *  版本Ver0.01
 *  作者: huanying2000
 *  版权:copyright 2010 by the Camellia project
 *  free software under the terms of the LGPL 2.1
 */

#ifndef CPLAYLIST_H_
#define CPLAYLIST_H_

#include "Globel.hpp"

using namespace std;

class CPlayList
{
	public:
		enum ENFetchMode
		{
			CURR, PREV, NEXT, RANDOM
		};

		CPlayList(string storgeFileName = "Camellia.lst");
		virtual ~CPlayList();
		bool add(const string filename);
		bool del(const int listIndex);
		string getFileName(ENFetchMode fetchMode);
		void readPlayList(void);
		void savePlayList(void);
		int getFileNumber(void) const;
#ifdef DEBUG
		void printPlayList(void) const;
#endif

	private:
		int listIndex;
		string storgeFile;
		ifstream in;
		ofstream out;
		vector<string> playList;
};

#endif /* CPLAYLIST_H_ */
